home *** CD-ROM | disk | FTP | other *** search
/ Turn the Power On! 3 / Turn the Power On! HP Volume III (HP)(1995).ISO / poweron-iii_bak < prev   
Text File  |  1995-10-03  |  3KB  |  127 lines

  1. #!/bin/ksh
  2.  
  3. # @(#) Version 2.2 August 1994
  4. set +u 
  5. arg0=$0
  6. PWD=`pwd`
  7. umask a=rwx
  8.  
  9. DIR=`dirname $arg0`
  10. BASE=PowerON-II
  11.  
  12. if [ $DIR = "." ]
  13. then
  14.     PATH_NAME=${PWD}/lib/${BASE}/
  15. else
  16.     PATH_NAME=${DIR}/lib/${BASE}/
  17. fi
  18.  
  19. LANGU=${LANG:=american}
  20. case ${LANGU} in
  21.     american ) ;;
  22.     japanese ) ;;
  23.     japanese.euc ) LANGU=japanese ;;
  24.     katakana ) LANGU=japanese ;;
  25.     chinese-t ) ;;
  26.     chinese-s ) LANGU=chinese-t ;;
  27.     korean ) ;;
  28.     * ) LANGU=american ;;
  29. esac
  30.  
  31. if [ ! -d $PATH_NAME${LANGU} ]
  32. then
  33.     LANGU=american
  34.     echo "The requested language was not found ! Proceeding in English."
  35. fi
  36.  
  37. echo @DEMO_HOME > /tmp/poweronii_vars
  38. echo  ${PATH_NAME} >> /tmp/poweronii_vars
  39. echo @LANGUAGE >> /tmp/poweronii_vars
  40. echo  ${LANGU}/ >> /tmp/poweronii_vars
  41. #
  42. # Set the working directory for the Mpresent program.
  43. #
  44. AIMTECH=${PATH_NAME}../../bin
  45. #
  46. #  Set the Variable File to load
  47. #
  48. AIM_VAR=${PATH_NAME}
  49. #
  50. # Export the variables
  51. #
  52. export AIMTECH
  53. #
  54. #
  55. MP=${PATH_NAME}../../bin/Mpresent
  56. export SHLIB_PATH=${PATH_NAME}../../lib/misc
  57. if [ -x /usr/audio/bin/send_sound ]
  58.    then
  59.       export SendAudio=/usr/audio/bin/send_sound
  60.    elif [ -x /usr/audio/bin/acontrol ]
  61.    then
  62.       export SendAudio=${PATH_NAME}../../bin/send_sound
  63. fi
  64.  
  65. cd ${PATH_NAME}
  66.  
  67. #../../bin/ilcolors 0 &
  68. #IL_PID=$!
  69. #sleep 1
  70. #kill -0 $IL_PID 2>/dev/null
  71. #IL_STAT=$?
  72. #if [ 0 -ne ${IL_STAT} ]
  73. #    then
  74. #        /usr/bin/X11/xdialog -t "PowerON II" -p HPlogo.bm -m  \
  75. #"  There are not enough colors 
  76. #   available for this demo to run
  77. #   correctly.  Please stop some
  78. #   applications and try again." 
  79. #        exit 1
  80. #fi
  81.  
  82. aserver=`ps -e|grep Aserver`
  83. if [  ! "$aserver" ]
  84.     then
  85.         /usr/bin/X11/xdialog -t "Audio Server" -p HPlogo.bm -m  \
  86. "  The audio server does not 
  87.    appear to be running.  You
  88.    will not be able to hear
  89.    any sounds."
  90. fi
  91.  
  92. trap " kill $IL_PID ; ../../bin/kfork drive_server ; rm -f /tmp/poweron_vars /tmp/windows.dbf ; exit " 2 3 15
  93.  
  94. /usr/bin/X11/xdialog -t "PowerON II" -p HPlogo.bm -m  \
  95. "  
  96. Welcome to Turn the PowerON II
  97.  
  98.  Loading the Demo from disk.
  99.  
  100.         Please wait" &
  101. XWD_PID=$!
  102. #cover/cache.ksh
  103.  
  104. PATH=$PATH:.
  105. DISPLAY=${DISPLAY:=local:0}
  106. export SB_710_VM_DB=TRUE
  107. #export AIM_VAR=$PATH_NAME
  108.  
  109. if [ -x /usr/audio/bin/AudioCP ]
  110.    then
  111.       /usr/audio/bin/AudioCP -geometry +0-1&
  112.    elif [ -x /usr/audio/bin/acontrol ]
  113.       then
  114.          /usr/audio/bin/acontrol -geometry +0-1&
  115. fi
  116. ACP=$!
  117. kill $XWD_PID 2>/dev/null
  118. $MP ${PATH_NAME}PowerON_New.iw
  119.  
  120. kill $IL_PID 2>/dev/null
  121. kill $ACP
  122. ../../bin/kfork drive_server
  123. ../../bin/kfork send_sound
  124. ../../bin/kfork mplay
  125. ../../bin/kfork cover.ksh
  126. rm -f /tmp/poweron_vars /tmp/windows.dbf
  127.